/***************************************************************************
 创建者: 华磊
 开始时间: 2018.8.14
 copyright: (C) 华友高科
 修改说明: (每次有修改就添加一条，带有 修改人，修改时间，修改描述)
 example (1) 李文友 2017.5.8 类的具体实现代码编写

 ***************************************************************************
 *  @file x.h
 *  功能:
 *
 *                                                                         *
 ***************************************************************************/
#ifndef VREPTEST_H
#define VREPTEST_H


#include <QWidget>
#include <QThread>
#include <QTimer>


class VrepObject;
class VrepControl;

namespace Ui {
class VrepTest;
}

class QTimer;
/**
 * @brief The VrepTest class 控制界面ui
 */
class VrepTest : public QWidget
{
    Q_OBJECT

public:
    explicit VrepTest(QWidget *parent = 0);
    ~VrepTest();
    int startConnectVrep(int simRobotId);

    VrepControl* vrepControl ;
signals:
    void signal_new_client(int socketDescriptor);
    void signal_connect_to_remote_server(int port);
    void signal_joint_change(int index, float val);
    void signal_send_to_remote_server( QByteArray buf );

public slots:
    void displayMsg( QString msg ,int code = 0 );

private slots:
    void slot_dataChanged();
    void on_doubleSpinBox_toval_valueChanged(double arg1);
    void on_doubleSpinBox_zj_valueChanged(double arg1);
    void on_pushButton_line_toggled(bool checked);
    void on_pushButton_StartVrep_toggled(bool checked);
    void on_comboBox_io_mode_currentIndexChanged(int index);
    void on_comboBox_motor_mode_currentIndexChanged(int index);
    void on_comboBox_robot_currentIndexChanged(const QString &arg1);

//    void on_pushButton_jian_clicked();
//    void on_pushButton_jia_clicked();
    void on_pushButton_jian_pressed();
    void on_pushButton_jia_pressed();

    void on_comboBox_joint_currentIndexChanged(int index);



private:
    Ui::VrepTest *ui;
    VrepObject* vobj;
    bool isRunDemo;
    QTimer timer;

};

#endif // VREPTEST_H
